<?php

namespace app\validate;

use app\base\BaseValidate;

/**
 * 验证器-BusinessValidate
 * Class BusinessValidate
 * @package app\validate
 */
class BusinessValidate extends BaseValidate
{
    protected $rule = [
        'id' => 'require|number',
        'user_id|绑定的用户id' => 'require',
        'name|商家名称' => 'require',
        'contact_name|商家联系人' => 'require',
        'contact_phone|商家联系电话' => 'require',
        'storefront|门脸照' => 'require',
        'address|商家地址' => 'require',
        'check_status|状态' => 'require|in:0,1,2',
    ];

    //验证场景-更新
    public function sceneUpdate()
    {
        return $this->only(['id', 'check_status', 'store_check_time', 'store_check_info']);
    }
}
